package com.zhs.elasticsearch.schedule;

import com.zhs.elasticsearch.util.HttpGet;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 *
 * @Author zhenghuisheng
 * @Date：2025/8/25 16:47
 */

@Component
@Slf4j
public class Article {

    private Integer count = 0;

    @Scheduled(fixedRate = 120 * 1000)//具体时间间隔，120*1000也就是2分钟执行一次
    void doSomethingWith() {

        long start = System.currentTimeMillis();
        String vue1 = "https://blog.csdn.net/m0_59269218/article/details/149144958?spm=1001.2014.3001.5502";
        String vue2 = "https://blog.csdn.net/m0_59269218/article/details/149488753?spm=1001.2014.3001.5502";
        String vue3 = "https://blog.csdn.net/m0_59269218/article/details/149518527?spm=1001.2014.3001.5502";
        String wx1 = "https://blog.csdn.net/m0_59269218/article/details/149618570?spm=1001.2014.3001.5502";
        String wx2 = "https://blog.csdn.net/m0_59269218/article/details/149694733?spm=1001.2014.3001.5502";
        String wx3 = "https://blog.csdn.net/m0_59269218/article/details/149758196?spm=1001.2014.3001.5502";
        String wx4 = "https://blog.csdn.net/m0_59269218/article/details/149888695?spm=1001.2014.3001.5502";
        String wx5 = "https://blog.csdn.net/m0_59269218/article/details/150150288?spm=1001.2014.3001.5502";
        String wx6 = "https://blog.csdn.net/m0_59269218/article/details/150319306?spm=1001.2014.3001.5502";
        String wx7 = "https://blog.csdn.net/m0_59269218/article/details/150456369?spm=1001.2014.3001.5502";
        String m1 = "https://blog.csdn.net/m0_59269218/article/details/150475140?spm=1001.2014.3001.5502";
        String m2 = "https://blog.csdn.net/m0_59269218/article/details/150726050?spm=1001.2014.3001.5502";
        HttpGet.sendGet(vue1);
        HttpGet.sendGet(vue2);
        HttpGet.sendGet(vue3);
        HttpGet.sendGet(wx1);
        HttpGet.sendGet(wx2);
        HttpGet.sendGet(wx3);
        HttpGet.sendGet(wx4);
        HttpGet.sendGet(wx5);
        HttpGet.sendGet(wx6);
        HttpGet.sendGet(wx7);
        HttpGet.sendGet(m1);
        HttpGet.sendGet(m2);
        count++;
        log.info("==========================访问量增加了" + (count*12) + ";=====所用的时间为:" + (System.currentTimeMillis() - start) );

    }
}
